<template>
  <el-dialog
    :visible="dialogVisible"
    :title="title"
    append-to-body
    fullscreen
    @close="handleClear"
    :close-on-click-modal="false"
  >
    <component
      :is="currentFormComponent"
      :formData="formData"
      @submit="handleFormSubmit"
    ></component>
  </el-dialog>
</template>
<script>
import FormScore from './methods/FormScore'
export default {
  components: {
    FormScore
  },
  data() {
    return {
      dialogVisible: false,
      title: '',
      currentFormComponent: 'FormScore',
      formData: {}

    };
  },
  methods: {
    openDialog(row) {
      this.title = row.title
      this.dialogVisible = true
      this.formData = {}
    },
    handleFormSubmit(data) {
      console.log('Form data:', data);
      // this.dialogVisible = false;
    },
    handleClear() {
      this.dialogVisible = false
    }
  }
};
</script>
<style lang="scss" scoped>
</style>